package com.example.cromos;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class SecActivity extends Activity {

	private ListView cromoList;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_sec);
		cromoList = (ListView) findViewById(R.id.cromosListView);
		ArrayAdapter<Cromo> arrayAdapter = new ArrayAdapter<Cromo>(getApplicationContext(), android.R.layout.simple_list_item_1, CromoDAO.getCromos());
		cromoList.setAdapter(arrayAdapter); 
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.sec, menu);
		return true;
	}

}
